package com.example.demo.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

@Service
@Slf4j
public class MyAsyncService {

    @Async
    public void asyncMethod(Long millisecond, String value) {
        // 模拟耗时操作
        try {
            Thread.sleep(millisecond);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        log.info("输出结果{}", value);
    }




}
